Row

confirmed

121

Active Cases

116

recovered

4

death

1

Column

Map

Column

Town cases

COVID19 cases (Erie county)
town confirmed recovered deaths
Amherst 37 NA NA
Buffalo 36 NA NA
Hamburg 7 NA NA
Clarence 6 NA NA
Tonawanda 5 NA NA
Lancaster 4 NA NA
Orchard Park 4 NA NA
West Seneca 4 NA NA
North Collins 3 NA NA
Cheektowaga 3 NA NA
Grand Island 3 NA NA
Alden 2 NA NA
Elma 2 NA NA
Lackawanna 1 NA NA
Concord 1 NA NA
Aurora 1 NA NA
Evans 1 NA NA
Holland 1 NA NA
Total 121 NA NA
Note:
Last updated: (updated 3/25/2020 12:30PM EST)
Data Source
Public Advisories
The data is only for educational and academic research purposes.

Daily cumulative cases

---
title: "COVID19 in Erie county"
author: "Q Hu"
output: 
  flexdashboard::flex_dashboard:
    orientation: rows
    social: menu
    navbar:
      - { icon: fa-github, href: "https://github.com/hubentu/COVID19Erie"}
      - { title: "Erie Case Map", href: "https://erieny.maps.arcgis.com/apps/opsdashboard/index.html#/dd7f1c0c352e4192ab162a1dfadc58e1"}
    source_code: embed
    vertical_layout: scroll
---

```{r setup, include=FALSE, eval=FALSE}
library(flexdashboard)
library(COVID19Erie)
pubExposed <- exposedPub()
```

```{r}
counts <- caseCounts()
Counts <- rbind(counts,
                c(town = "Total", colSums(counts[,-1])))
```




Row {data-width=400}
-----------------------------------------------------------------------

### confirmed {.value-box}

```{r}
valueBox(
  value = attributes(counts)$total.confirmed,
  caption = "Total confirmed cases",
  icon = "fas fa-user-md",
  color = "purple"
)
```

### Active Cases {.value-box}
```{r}
valueBox(
  value = attributes(counts)$active.cases,
  caption = "Active cases",
  icon = "fas fa-ambulance",
  color = "#1f77b4"
)
```

### recovered {.value-box}

```{r}
valueBox(
  value = attributes(counts)$total.recovered,
  caption = "Total recovered cases",
  icon = "fas fa-ambulance",
  color = "forestgreen"
)
```

### death {.value-box}

```{r}
valueBox(
  value = attributes(counts)$total.deaths,
  caption = "Death cases",
  icon = "fas fa-heart-broken",
  color = "red"
)
```


Column {data-height=800}
-----------------------------------------------------------------------
    
### Map
    
```{r}
caseMap(counts, pubExposed, titlePos = NULL)
```
   
Column {data-height=600}
----------------------------------------------------------------------

### Town cases

```{r}
library(knitr)
library(kableExtra)
kable(Counts,
      caption = "COVID19 cases (Erie county)") %>%
    kable_styling(full_width = TRUE) %>% 
    footnote(general = c(paste("Last updated:", attributes(counts)$update.time),
                         "[Data Source](https://erieny.maps.arcgis.com/apps/opsdashboard/index.html#/dd7f1c0c352e4192ab162a1dfadc58e1)",
                         "[Public Advisories](http://www2.erie.gov/health/index.php?q=public-advisories)",
                         "The data is only for educational and academic research purposes.")) %>%
scroll_box(height = "600px")
```

### Daily cumulative cases
```{r}
countPlot(historyCount)
```